package com.arpa.wms.domain.enums;

import java.util.HashMap;
import java.util.Map;

/*
 * @description:  是否删除枚举
 * @author yanqy
 * @date: 2022/1/17 9:30
 */
public enum DeleteStatusEnum {
    /**
     * 删除标志
     */
    NOTDELETE(0, "未删除"),
    DELETED(1, "已删除");

    private final Integer code;
    private final String msg;

    DeleteStatusEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    private static final Map<Integer, DeleteStatusEnum> ENUM_MAP = new HashMap();

    static {
        DeleteStatusEnum[] values = values();
        int length = values.length;
        for(int i = 0; i < length; i++){
            DeleteStatusEnum value1 = values[i];
            ENUM_MAP.put(value1.getCode(),value1);
        }
    }

    public static DeleteStatusEnum getEnumByValue(String value){

        return ENUM_MAP.get(value);
    }

    public Integer getCode() {
        return code;
    }


    public String getMsg() {
        return msg;
    }

}
